<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div>
        等腰三角形
    </div>
    <script>
        var str = '' ;
        var str1 = '*' ;
        var str2 = '-' ;
        for (var i = 1 ; i <= 9 ; i += 2 ){
            for ( var j = i ; j <= 9 ; j += 2 ){
                str = str + str2 ;
            }
            for ( var k = 1 ; k <= i ; k ++ ) {
                str = str + str1 ;
            }
            str = str + "</br>" ;
        }
        document.write(str);
    </script>
</body>
</html>